Skip to content

Conversation

@lidavidm
Copy link
Member

This doesn't fix the flaky case, just gets us extra debug info in the case that it does.

@github-actions
Copy link

@alamb
Copy link
Contributor

alamb commented Feb 26, 2021

👍 thank you @lidavidm

@lidavidm
Copy link
Member Author

The test stops failing once I add debug logging on the Rust side :/ But the C++ debug logs report that when it connects to the Rust server, the server resets the connection.

@lidavidm
Copy link
Member Author

Actually, I think I see the issue now. The Rust service starts listening on the port in listen_on in flight_server_scenarios.rs, but the Flight server isn't set up until after that - so if the client connects in between, it'll get an error. Do you have to await the future from serve() in order for the gRPC server to actually start listening? That way, the printing could be delayed until the server is actually ready.

@alamb
Copy link
Contributor

alamb commented Feb 27, 2021

Thanks @lidavidm -- that sounds very plausible. I'll get a PR up with a proposed fix

@alamb
Copy link
Contributor

alamb commented Feb 27, 2021

Proposed PR here: #9593

@lidavidm lidavidm closed this Feb 27, 2021
lidavidm pushed a commit that referenced this pull request Feb 27, 2021
…es with rust

# Background
Thanks to the 🦅 👁️  of @lidavidm #9583 (comment) it appears that the Rust flight integration test prints `"Server listening"` before the server is *actually* read to accept connections. Thus creating a race condition: if the tests try and start faster than the rust server can actually be setup then we see integration test failures as shown in https://issues.apache.org/jira/browse/ARROW-11717:

```
Traceback (most recent call last):
  File "/arrow/dev/archery/archery/integration/runner.py", line 308, in _run_flight_test_case
    consumer.flight_request(port, **client_args)
  File "/arrow/dev/archery/archery/integration/tester_cpp.py", line 116, in flight_request
    run_cmd(cmd)
  File "/arrow/dev/archery/archery/integration/util.py", line 148, in run_cmd
    raise RuntimeError(sio.getvalue())
RuntimeError: Command failed: /build/cpp/debug/flight-test-integration-client -host localhost -port=33569 -scenario auth:basic_proto
With output:
--------------
-- Arrow Fatal Error --
Invalid: Expected UNAUTHENTICATED but got Unavailable
```

# Changes
This PR changes the Rust flight scenario harnesses to print the ready message after the server is *actually* ready.

Closes #9593 from alamb/alamb/arrow-11717

Authored-by: Andrew Lamb <[email protected]>
Signed-off-by: David Li <[email protected]>
alamb added a commit to apache/arrow-rs that referenced this pull request Apr 20, 2021
…es with rust

# Background
Thanks to the 🦅 👁️  of @lidavidm apache/arrow#9583 (comment) it appears that the Rust flight integration test prints `"Server listening"` before the server is *actually* read to accept connections. Thus creating a race condition: if the tests try and start faster than the rust server can actually be setup then we see integration test failures as shown in https://issues.apache.org/jira/browse/ARROW-11717:

```
Traceback (most recent call last):
  File "/arrow/dev/archery/archery/integration/runner.py", line 308, in _run_flight_test_case
    consumer.flight_request(port, **client_args)
  File "/arrow/dev/archery/archery/integration/tester_cpp.py", line 116, in flight_request
    run_cmd(cmd)
  File "/arrow/dev/archery/archery/integration/util.py", line 148, in run_cmd
    raise RuntimeError(sio.getvalue())
RuntimeError: Command failed: /build/cpp/debug/flight-test-integration-client -host localhost -port=33569 -scenario auth:basic_proto
With output:
--------------
-- Arrow Fatal Error --
Invalid: Expected UNAUTHENTICATED but got Unavailable
```

# Changes
This PR changes the Rust flight scenario harnesses to print the ready message after the server is *actually* ready.

Closes #9593 from alamb/alamb/arrow-11717

Authored-by: Andrew Lamb <[email protected]>
Signed-off-by: David Li <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants